#include "set.hpp"

Set::Set(const int& id, const QString& name, const QString& desc, QList<QSharedPointer<Question> > &questions, QObject *parent)
	:QObject(parent)
	,m_id(id)
	,m_name(name)
	,m_desc(desc)
	,m_questions(questions)
{
}

int Set::id() const {
	return m_id;
}

QString Set::name() const {
	return m_name;
}

QString Set::desc() const {
	return m_desc;
}

QList<QSharedPointer<Question> > Set::questions() const{
	return m_questions;
}

void Set::setName(const QString& newName) {
	m_name = newName;
}

void Set::setDesc(const QString& newDesc) {
	m_desc = newDesc;
}

void Set::setQuestions(const QList<QSharedPointer<Question> >& questions) {
	m_questions = questions;
}

void Set::addQuestion(QSharedPointer<Question> question) {
	m_questions.append(question);
}


